package com.demo.celue;

public class CashReturn extends CashSuper{

	private double moneyCondition;
	private double moneyReturn;
	
	public CashReturn(double _moneyCondition,double _moneyReturn){
		this.moneyCondition=_moneyCondition;
		this.moneyReturn=_moneyReturn;
	}
	
	@Override
	public double acceptCash(double money) {
		if (money>moneyCondition) {
			return money-moneyReturn;
		}
		return 0;
	}

}
